public class Test1 {
    public static void main(String[] args) throws InterruptedException {
        // 使用 wait
        Object obj = new Object();
        synchronized (obj){
            System.out.println("wait 之前");
            obj.wait();
            System.out.println("wait 之后");
        }
    }
}
